package com.snopy.designPattern.structure.bridge;

import com.snopy.designPattern.structure.bridge.impl.EmailMessage;
import com.snopy.designPattern.structure.bridge.impl.EmailMessageSender;
import com.snopy.designPattern.structure.bridge.impl.TxtMessage;
import com.snopy.designPattern.structure.bridge.impl.TxtMessageSender;
import com.snopy.designPattern.structure.bridge.inter.Message;
import com.snopy.designPattern.structure.bridge.inter.MessageSender;

/**
 * @author snopy
 * @version 1.0.0
 * @classname BridgePatternDemo
 * @description
 * @email 77912204@qq.com
 * @date 2022/03/02 18:20
 */
public class BridgePatternDemo {
    public static void main(String[] args) {
        MessageSender sender = new TxtMessageSender();
        Message message = new TxtMessage(sender);
        message.send();
        MessageSender sender1 = new EmailMessageSender();
        Message message1 = new EmailMessage(sender1);
        message1.send();
        Message message2 = new EmailMessage(sender);
        message2.send();
    }
}
